playerName(playerId) {
    new _nickName[MAX_PLAYER_NAME];
    GetPlayerName(playerId, _nickName, MAX_PLAYER_NAME);
    return _nickName;
}

playerIP(playerId) {
    new playerAddress[32];
    GetPlayerIp(playerId, playerAddress, 32);
    return playerAddress;
}

weaponName(weaponId) {
    new gunName[32];
    switch (weaponId) {
        case 0: gunName = "Fists";
        case 1: gunName = "Brass Knuckles";
        case 2: gunName = "Golf Club";
        case 3: gunName = "Nite Stick";
        case 4: gunName = "Knife";
        case 5: gunName = "Baseball Bat";
        case 6: gunName = "Shovel";
        case 7: gunName = "Pool Cue";
        case 8: gunName = "Katana";
        case 9: gunName = "Chainsaw";
        case 10: gunName = "Dildo";
        case 11: gunName = "Dildo";
        case 12: gunName = "Dildo";
        case 13: gunName = "Dildo";
        case 14: gunName = "Flowers";
        case 15: gunName = "Cane";
        case 16: gunName = "Grenade";
        case 17: gunName = "Tear Gas";
        case 18: gunName = "Molotov";
        case 22: gunName = "9mm";
        case 23: gunName = "Silenced 9mm";
        case 24: gunName = "Desert Eagle";
        case 25: gunName = "Shotgun";
        case 26: gunName = "Sawnoff";
        case 27: gunName = "Spas12";
        case 28: gunName = "Uzi";
        case 29: gunName = "MP5";
        case 30: gunName = "AK47";
        case 31: gunName = "M4";
        case 32: gunName = "Tec9";
        case 33: gunName = "Country Rifle";
        case 34: gunName = "Sniper";
        case 35: gunName = "Rocketlauncher";
        case 36: gunName = "Rocketlauncher";
        case 37: gunName = "Flamethrower";
        case 38: gunName = "Minigun";
        case 41: gunName = "Spraycan";
        case 51: gunName = "Explosion";
        default: gunName = "Unknown";
    }

    return gunName;
}

forward onGameStart(gameId, baseId);
public onGameStart(gameId, baseId) {
    new formattedMessage[128];
    format(formattedMessage, sizeof(formattedMessage), "6* %s %d has been started.", (!gameId) ? ("Arena") : ("Base"), baseId);
    IRC_Say(g_ircBot, g_configData[echoChannel], formattedMessage);
}

forward onGameEnd(gameId, reason, const winner[], scoreHome, scoreAway);
public onGameEnd(gameId, reason, const winner[], scoreHome, scoreAway) {
    new formattedMessage[128];
    
    if (reason == CASE_ADMIN_END) {
        format(formattedMessage, sizeof(formattedMessage), "6* The %s has been ended by an administrator.", (!gameId) ? ("Arena") : ("Base"));
        IRC_Say(g_ircBot, g_configData[echoChannel], formattedMessage);
        return true;
    }
    
    format(formattedMessage, sizeof(formattedMessage), "6* %s won the %s. (Home %d - %d Away)", winner, (!gameId) ? ("Arena") : ("Base"), scoreHome, scoreAway);
    IRC_Say(g_ircBot, g_configData[echoChannel], formattedMessage);
    return true;
}

forward onPickMVP(const name[], kills);
public onPickMVP(const name[], kills) {
    new formattedMessage[128];
    format(formattedMessage, sizeof(formattedMessage), "14[ 6MVP: %s - %d Kills14 ]", name, kills);
    IRC_Say(g_ircBot, g_configData[echoChannel], formattedMessage);
}

forward onPlayerKick(const name[], const admin[], const reason[], isBan);
public onPlayerKick(const name[], const admin[], const reason[], isBan) {
    new formattedMessage[128];
    format(formattedMessage, sizeof(formattedMessage), "10%s has been %s by %s. (%s)", name, (isBan) ? ("banned") : ("kicked"), admin, reason);
    IRC_Say(g_ircBot, g_configData[echoChannel], formattedMessage);
}
